package net.lzzy.practicesapi1.entities;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author lyz
 */
@Entity
@Getter
@Setter
public class Result extends BaseEntity {
    @Transient
    private static final int TYPE_RIGHT =0;
    @Transient
    private static final int TYPE_MISS =1;
    @Transient
    private static final int TYPE_EXTRA =2;
    @Transient
    private static final int TYPE_WRONG =3;
    @Transient
    private static final int TYPE_UNFINISHED =4;
    @Temporal(TemporalType.TIMESTAMP)
    private Date commitTime;
    @ManyToOne
    private Question question;
    @ManyToOne
    private User student;
    @ManyToMany
    private List<Option>options = new ArrayList<>();
    public Result(){
        commitTime =new Date();
    }
}
